import Vue from 'vue'
import VueRouter from 'vue-router'
import Cart from '../views/cart.vue'
import Address from '../views/address.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'cart',
    component: Cart
  },
  {
    path: '/address',
    name: 'address',
    component: Address
  }
]

const router = new VueRouter({
  // 如果想去掉url地址栏中的“#”我们可以用路由的 history 模式,
  mode: 'history',
  routes
})

export default router
